from sqlalchemy import Sequence, Column
from sqlalchemy.orm import relationship 
from sqlalchemy.types import Integer, String
from __init__ import Base

class Groups(Base):

    __tablename__ = "groups"

    id = Column(Integer, Sequence('user_id_seq'), primary_key=True)
    name = Column(String(50))

    gridgroup = relationship('GridGroup')
    widgetgroup = relationship('WidgetGroup')
    usergroup = relationship('UserGroup')
    dashboardgroup = relationship('DashboardGroup')
    operationgroup = relationship('OperationGroup')

    def __init__(self, name):
        self.name = name

    def __repr__(self):
        return "<Group('%s')>" % self.name
